package cn.yi.medicalsys.service.impl;
import java.util.List;

import cn.yi.medicalsys.dao.RegisterDao;
import cn.yi.medicalsys.dao.impl.RegisterDaoImpl;
import cn.yi.medicalsys.pojo.Register;
import cn.yi.medicalsys.service.RegisterService;

public class RegisterServiceImpl implements RegisterService {
	RegisterDao register = new RegisterDaoImpl();
	
	public static void main(String[] args) {
		RegisterService sh = new RegisterServiceImpl();
		System.out.println(sh.findRegisterBydate(null));
	}

	@Override
	public List<Register> findRegisterBydate(String date) {
		List<Register> list=null;
		try {
			list=register.findRegisterBydate(date);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	@Override
	public int updateRegisterByNo(Integer idreg) {
		int row =-1;
		try {
			row=register.updateRegisterByNo(idreg);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return row;
	}
}
